#include "Core.h"
#include "GraphicsManager.h"
#include "SoundManager.h"
#include "Utils\Defines.h"
#include "InputManager.h"

CCore::CCore(void)
{
}


CCore::~CCore(void)
{
}

void
CCore::Init(HWND hWnd, bool fullscreen, uint32 width, uint32 height)
{
	m_graphicsManager = new CGraphicsManager();
	m_graphicsManager->Init(hWnd, fullscreen, width, height);
	m_soundManager = new CSoundManager();
	m_soundManager->Init();
	m_inputManager = new CInputManager();
	m_inputManager->Init(hWnd, Vect2i(width, height), false);
}

void
CCore::DeInit()
{
	m_graphicsManager->DeInit();
	CHECKED_DELETE(m_graphicsManager);
	m_soundManager->DeInit();
	CHECKED_DELETE(m_soundManager);
}

void
CCore::Update()
{
	m_graphicsManager->Update();
	m_soundManager->Update();
	m_inputManager->Update();
}

void
CCore::Render()
{
	//m_graphicsManager->Render();
	m_soundManager->Render();
}